<?php
require_once('conf/config.php.inc');
require_once(SYBMAS_LAYOUT_PATH.'/layout.php.inc');
require_once(SYBMAS_LIB_PATH.'/liblogin.php.inc');
require_once(SYBMAS_LIB_PATH.'/libsybase.php.inc');
require_once(SYBMAS_LIB_PATH.'/libsybmas.php.inc');
//require_once(SYBMAS_LIB_PATH.'/libopcionMenu.php.inc');
require_once(SYBMAS_LAYOUT_PATH.'/menu.php.inc');	
verificar_inicio_sesion();
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<link rel="stylesheet" type="text/css" href="<?php echo LAYOUT_URI?>/sybmasstyle.css">
<script src="<?php echo LAYOUT_URI?>/jquery-1.2.1.min.js" type="text/javascript"></script>
<script src="<?php echo LAYOUT_URI?>/menu-collapsed.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="<?php echo LAYOUT_URI?>/style.css" >
<title>.:: Sybmas - INDEX</title>
<!--[if lt IE 8]>
   <style type="text/css">
   li a {display:inline-block;}
   li a {display:block;}
   </style>
   <![endif]-->
</head>
<body>
<script src="<?php echo JAVASCRIPT_URI?>/tooltip/wz_tooltip.js" type="text/javascript"></script>
<center>
<div id="container">
<div id="header">
<?php echo generar_header();?>
</div>
<div id="scene">
<div id="modulos">
<ul id="menu" style="width: 150px;">
	<?php echo generar_menu();?>
</ul>
</div>

<div id="title"> Usuario: <?php echo obtener_nombre_usuario()?></div>
<div id="main">

<h1>Sistema de Administración Modular para Sybase</h1>
<h2>Sesion iniciada como: <?php echo obtener_nombre_usuario()?></h2>

<table border="1">
	<tr>
		<td><span onmouseover="Tip('Identificador unico de login')" onmouseout="UnTip()">suid</span></td>
		<td><?php echo $_SESSION['sybmas.user.suid'];?></td>
	</tr>
	<tr>
		<td><span onmouseover="Tip('')" onmouseout="UnTip()">status</span></td>
		<td><?php echo $_SESSION['sybmas.user.status'];?></td>
	</tr>
	<tr>
		<td><span onmouseover="Tip('Nombre de la base datos a la que el login se conecta por defecto')" onmouseout="UnTip()">dbname</span></td>
		<td><?php echo $_SESSION['sybmas.user.dbname'];?></td>
	</tr>
	<tr>
		<td><span onmouseover="Tip('Lenguaje por defecto del login')" onmouseout="UnTip()">language</span></td>
		<td><?php echo $_SESSION['sybmas.user.language'];?></td>
	</tr>
	<tr>
		<td><span onmouseover="Tip('Nombre completo o descripcion del login')" onmouseout="UnTip()">fullname</span></td>
		<td><?php echo $_SESSION['sybmas.user.fullname'];?></td>
	</tr>
	<tr>
		<td><span onmouseover="Tip('Roles asociados al login')" onmouseout="UnTip()">roles</span></td>
		<td>
			<?php
			if(array_key_exists('sybmas.user.roles',$_SESSION) 
				&& count($_SESSION['sybmas.user.roles'])>0){
				echo "<ul>"; 
				foreach ($_SESSION['sybmas.user.roles'] as $role) {
					echo "<li>$role</li>";
				}
				echo "</ul>";
			}
			?>
		</td>
	</tr>
</table>
</div>
</div>
<?php echo generar_footer();?>
</div>
</center>
</body>
</html>
